﻿using System;
using System.Collections.Generic;

namespace Eneta.Portal.Common.Dto
{
    /// <summary>
    /// Class for second level IO items. This class is marked as serializable to support 
    /// different caching mechanisms.
    /// </summary>
    [Serializable]
    public class IoLevel2
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="IoLevel2"/> class.
        /// </summary>
        public IoLevel2()
        {
            Level3Items = new List<IoLevel3>();
        }

        /// <summary>
        /// Gets or sets the id of second level item.
        /// </summary>
        public int Id { get; internal set; }

        /// <summary>
        /// Gets or sets the title of second level item.
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the first level item (parent item) that hold current second level item.
        /// </summary>
        public IoLevel1 Level1 { get; set; }

        /// <summary>
        /// Gets or sets the list of third level items that are children of this second level item.
        /// </summary>
        public IList<IoLevel3> Level3Items { get; internal set; }
    }
}
